<template>
	<view>
		<!-- 顶部标题组件 -->
		<!-- <nav-bar :backState="1000" type="fixed" :titleCenter="false" bgColor="#fff">场地列表</nav-bar> -->
		<!-- v-if="items.field_list.length > 0" -->
		<view class="kapian" v-for="(items,index) in field_list">
			<view class="kon" style="height: 1rpx;"> </view>
			<view class="biaoti" @click="">
				{{items.venue_name}}
			</view>
			<view class="dizhi">
				地址：{{items.venue_address}}
			</view>

			<!-- <view class="" style="display: flex; flex-flow:row wrap;align-items:center; ">
				<view v-for="(items1,index1) in items.list">
					<view style="margin-left: 35rpx; margin-top: 20rpx; width: 30%;height: 200rpx;">
						<u-image :showLoading="true" :src="items1.ticket_picture" width="70px" height="100px "
							@click="ticketcilck(items1,items)">
						</u-image>
						<view style="width: 120rpx; margin-left: 10rpx; margin-top: 20rpx;font-size: 24rpx;">
							{{items1.ticket_name}}
						</view>
						<view style="width: 120rpx; margin-left: 10rpx; margin-top: 20rpx;">
							12 
						</view>
					</view>
					<view class="kon" style="height: 30rpx;"></view>
				</view>
			</view>
			<view class="kon" style="height: 30rpx;"> </view> -->
			<view>
				<view class="zhanshi" style="display: flex;justify-content: flex-start;flex-wrap: wrap; width: 100%;">
					<view class="tu" style="width:33%;margin-bottom: 10rpx;" v-for="(items1,index1) in items.list">
						<image class="tu_img" :showLoading="true" :src="items1.picture" shape="square" 
							@click="ticketcilck(items1,items)">
						</image>
						<view class="wen">
							{{items1.card_name}}
						</view>
						<view class="qian">
							<view class="jiage">
								¥{{items1.price}}
							</view>
							<!-- <view class="huaxian">
								¥{{items1.leastprice}}
							</view> -->
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import getDateTime from '@/common/getdateTime.js';
	const index = require('@/api/index/index.js')
	export default {
		data() {
			return {
				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
				changdiList: [],
				venuename: [],
				address: [],
				fieldtype: [],
				field_list: []
			}
		},
		onLoad(option) {
			var that = this
			that.getChangDiData()

		},
		methods: {
			ticketcilck(items1,items){
				// const s =  parseInt(getDateTime.dateTimeStr('h'));
				// console.log(s)
				// if(s <=8 || s>=21){
				// 	uni.showToast({
				// 		title: '未到时间',
				// 		mask: true,
				// 		duration: 3000,
				// 		icon: 'none'
				// 	})
				// }else{
				// 	uni.navigateTo({
				// 		url: '/page_venues/memberTicket/memberTicket?id=' + id+'&venueno='+items.venueno,
				// 	})	
				// }
				console.log(items1,items)
				uni.navigateTo({
					url: '/page_venues/memberCard/memberCard?ids=' + items1.id+'&card_type='+items1.card_type,
				})

			},
			getChangDiData(option) {
				index.cardindex().then(res => {
					if (res.code == 1) {
						this.field_list = res.data
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.kapian {
		background: rgb(246, 239, 245);
		background-image: linear-gradient(0deg, rgb(251, 252, 255) 0%, rgb(251, 252, 255) 37%, #c8f7f3 69%, #a1d0d0 89%, #66a6ac 100%);
		width: 95%;
		border-radius: 20rpx;
		margin: auto;
		margin-top: 30rpx;
	}

	.zhanshi {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		justify-content: center;
		// margin-left: 20rpx;
		margin-top: 20rpx;
		width:210rpx;
		
		.tu{
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column; 
			.tu_img{
				width:200rpx; 
				height:240rpx;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			.wen {
				font-size: 26rpx;
				// margin-left: 40rpx;
				margin-top: 15rpx;
				// font-weight: bold;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			.qian{
				font-size: 26rpx;
				color: #ff0000;
				font-weight: bold;
			}
		}
	}

	.biaoti {
		margin-left: 30rpx;
		margin-top: 35rpx;
		color: rgb(0, 58, 150);
		font-size: 32rpx;
		font-weight: 500;
		line-height: 30rpx;
		white-space: nowrap;
	}

	.dizhi {
		margin-left: 30rpx;
		margin-top: 20rpx;
		color: #acacac;
		font-size: 25rpx;
		font-weight: 500;
		line-height: 30rpx;
		white-space: nowrap;
	}
</style>